
#define SCR_BUF_ROWS(obj)	(((PvScreenBuffer *)(obj))->rows)
#define SCR_BUF_COLS(obj)	(((PvScreenBuffer *)(obj))->cols)

#define SCR_CURFR(o)		(((PvScreen *)(o))->curframe)
#define SCR_TOPFR(o)		(((PvScreen *)(o))->topframe)
#define SCR_CURWIN(o)		(FR_WIN(SCR_CURFR((o))))
#define SCR_CURBUF(o)		(WIN_BUF(SCR_CURWIN((o))))
#define SCR_WINDOWS(o)		(((PvScreen *)(o))->windows)
#define SCR_BUF(o)			(((PvScreen *)(o))->screen_buf)
#define SCR_COLS(o)			(((PvScreen *)(o))->cols)
#define SCR_ROWS(o)			(((PvScreen *)(o))->rows)
#define SCR_CHAR_WIDTH(o)	(((PvScreen *)(o))->char_width)
#define SCR_CHAR_HEIGHT(o)	(((PvScreen *)(o))->char_height)
#define SCR_CMD_LINES(o)	(((PvScreen *)(o))->cmd_lines)

#define PvScreen_Gets(s, r, c, len) \
	PvScreenBuffer_Getstr(((PvScreen *)(s))->screen_buf, (r), (c), (len))
#define PvScreen_Puts(s, r, c, text, len) \
	PvScreenBuffer_Putstr(((PvScreen *)(s))->screen_buf, (r), (c), (text), (len))

extern PyTypeObject	PvScreenBuffer_Type;
extern PyTypeObject	PvScreen_Type;

PyObject *PvScreenBuffer_Next(PvScreenBuffer *self, int *row, int *col);
PyObject *PvScreenBuffer_Putstr(PyObject *self, int row, int col, Py_UNICODE *str, int length);
Py_UNICODE *PvScreenBuffer_Getstr(PyObject *self, int row, int col, int length);
PyObject *PvScreen_Update(PyObject *self, int row1, int col1, int row2, int col2);
PyObject *PvScreenBuffer_Clear(PvScreenBuffer *self, int row1, int col1, int row2, int col2);





